Pirate Coves (1.2)
============
by lazygun

Hidden in the asteroid belt, something lurks

>Pirate n. One who robs at sea or plunders the land from the sea without commission from a sovereign nation.
>Cove n. A small sheltered bay in the shoreline of a sea, river, or lake.

Oolite is a wonderful retro space-combat game that runs on Mac OS X. I downloaded it, played it  (ah, the nostalgia...) and loved the new innovations, such as seeing a fight in the distance and choosing to interfere. 

As I played, I started thinking: where do the pirates sell their booty and replenish their ships? It ought to be dangerous for them to visit the system's main space station. In fact, version 1.38 of the game introduces  police viper patrols around the station.

So the pirates need somewhere to hang out. Well, we already have alternative places to dock: rock hermits.  Some tinkering, some modification of the program (aegidean was very co-operative) and pirate-coves.oxp is the result.

### Installation ###

Download pirate_coves_oxp.zip and extract its contents. Drag pirate_coves.oxp to your Oolite/AddOns folder.

### What it does ###

It's very simple. It turns 20% of rock hermits into be pirate bases. They look just like a rock hermit, and are reported by your identification system as such. There's absolutely no way to tell the difference, until the base launches a group of pirate ships to attack you! 

It also adds a few extra pirate coves. First, there's a guaranteed pirate cove at Diso, so you can very quickly start a new game and see a cove in action. It's also a very good way for a new pilot to die! Second, if there's enough pirate activity in a system, a pirate cove gets added. It's a bit of a reversal of cause and effect, but the result is there are lots of pirates in systems with pirate coves.

### Oolite versions ###
- It works with all Oolite versions from 1.43 until 1.65. And when used under Oolite version 1.72 or higher it uses the new script system.
- After 1.65 JavaScript was introduced and often changed so this oxp wont work with the Oolite test versions 1.66 until 1.71. 

### Bugs ###

With Oolite versions until 1.72 docking pirates don't increment the counter for available defence ships. This Oolite bug is fixed with oolite 1.73

### Update ###
28-6-09 Updated to version 1.2. Adapted for Oolite 1.73. (Will still work with 1.72) 
When used with Oolite 1.73 or higher the launching pirates use a custom script that makes them act better as group. With 1.73 pirates defenders will fly to the nearest station after a fight when out of scanner range of a their mother station. (In most case the nearest will be the pirate cove). With 1.72 or earlier pirates would just start lurking for victims like normal pirates.

3-1-2008 updated to version 1.1. The original version (no version nr) contained a bug in the AI that made it never launched pirates by itself after it detected a piece of floating debris.
The previously mentioned bug about returning defenders crashing while docking is not seen anymore. But docking was part of Oolite's internal docking routine and is probably fixed loooong ago.
Added a JS script with a more variable addition of the cove along the spacelane.
Lowered the 50% hermit replacement to 20%.